#安装
docker run -di --name=mysql -p 3306:3306 \
  -v ~/mysql/conf:/etc/mysql/conf.d \
  -v ~/mysql/logs:/logs \
  -v ~/mysql/data:/var/lib/mysql \
  -e MYSQL_ROOT_PASSWORD=root \
  -e TZ=Asia/Shanghai \
  --privileged=true \
  --restart=always \
  mysql:5.7

docker run -di --name=redis -p 6379:6379 \
  --restart=always \
  redis:5.0.2
# 数据库地址改成自己的内网地址
docker run -di --name=nacos -p 8848:8848 -p 9848:9848 \
  -e JVM_XMS=256m -e JVM_XMX=256m \
  -e MODE=standalone \
  -e PREFER_HOST_MODE=hostname \
  -e SPRING_DATASOURCE_PLATFORM=mysql \
  -e MYSQL_SERVICE_HOST=10.0.4.7 \
  -e MYSQL_SERVICE_DB_NAME=nacos_config \
  -e MYSQL_SERVICE_PORT=3306 \
  -e MYSQL_SERVICE_USER=root \
  -e MYSQL_SERVICE_PASSWORD=root \
  -v ~/nacos/logs:/home/nacos/logs \
  --restart=always \
  docker.io/nacos/nacos-server:2.0.3

docker run -d \
  -p 15672:15672 \
  -p 5672:5672 \
  -e RABBITMQ_DEFAULT_USER=guest \
  -e RABBITMQ_DEFAULT_PASS=guest \
  --name mq \
  --hostname mq \
  --restart=always \
  rabbitmq:3.8-management

#docker run \
#  -p 80:80 \
#  -p 8600:8600 \
#  --name=nginx \
#  -v ~/nginx/nginx.conf:/etc/nginx/nginx.conf \
#    --restart=always \
#    -v ~/data:/opt \
#    -d nginx:latest
#  -v ~/nginx/conf/conf.d:/etc/nginx/conf.d \
#  -v ~/nginx/logs:/var/log/nginx \
#  -v ~/nginx/html:/usr/share/nginx/html \

#docker cp nginx:/etc/nginx/nginx.conf ./nginx
#docker cp nginx:/etc/nginx/conf.d ./nginx/conf
#docker cp nginx:/usr/share/nginx/html ./nginx/html
#docker cp nginx:/var/log/nginx ./nginx/logs

#docker run -d \
#  -p 9411:9411 \
#  --restart=always \
#  openzipkin/zipkin

#docker run -p 9000:9000 \
#--name minio -d \
#--restart=always \
#-e "MINIO_ROOT_USER=minio" \
#-e "MINIO_ROOT_PASSWORD=yb4581844" \
#-v /home/data:/data \
#-v /home/config:/root/.minio minio/minio \
#server /data \
#--console-address ":9000" --address ":9090"

#mkdir -p ~/elastic/data
#docker run --name=es -p 9200:9200 -p 9300:9300 \
#  -e "discovery.type=single-node" \
#  -v ~/elastic/data:/data \
#  --restart=always \
#  docker.elastic.co/elasticsearch/elasticsearch:7.7.0
